<template>
<div>
  <!-- 顶部icon -->
  <HeaderTouch></HeaderTouch>
  <!-- 中间门票 -->
  
  <Ticket v-for="(item, index) in indexData" :ticketInfo="item" :index="index"></Ticket>
  
  <!-- 备案信息 -->
  <div class="record">
    <span>Copyright ©2022 light-hl.gitee.com</span>
    <span>京公网安备12345678910</span>
    <span>京ICP123456789号</span>
    <span >互联网药品信息服务资格证</span>
    <span>去哪儿网(访)客服电话123456</span>
  </div>
  <!-- 底部导航栏 -->
  <NavBarVue></NavBarVue>
  </div>
</template>

<script>
import NavBarVue from "../../components/common/NavBar.vue";
import HeaderTouch from "../../components/index/HeaderTouch.vue";
import Ticket from "../../components/index/Ticket.vue";
import { reactive, toRefs } from "@vue/reactivity";
import { onMounted } from "@vue/runtime-core";
import { getHome } from "../../api/service/home.js";
export default {
  components: { NavBarVue, HeaderTouch, Ticket },
  setup() {
    const state = reactive({
      indexData: [],
    });

    onMounted(() => {
      getHome().then((res) => {
        console.log("主页的接口数据", res);
        state.indexData = res.indexData;
        //  console.log('数据',state.indexData)
      });
    });
    return {
      ...toRefs(state),
    };
  },
};
</script>
<style scoped>
.record {
  text-align: center;
  font-size: .4693rem;
  color: #999999;
  line-height: .9387rem;
  padding: .64rem .2133rem .64rem .2133rem;
}
.none {
  text-decoration: none;
  list-style: none;
}
</style>
